import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { RecipesComponent } from './recipes.component';
// import { RecipesManageComponent } from './recipes-manage/recipes-manage.component';
// import { MaterialManageComponent } from './material-manage/material-manage.component';
// import { LabelManageComponent } from './label-manage/label-manage.component';
// import { ChannelManageComponent } from './channel-manage/channel-manage.component';


const RecipesRoutes: Routes = [
  {
    path: '',
    component: RecipesComponent,
    children: [
      {
        path: 'recipes-manage',
        // data: { name: '食谱管理', url: 'recipes/recipes-manage' },
        // component: RecipesManageComponent,
        loadChildren: './recipes-manage/recipes-manage.module#RecipesManageModule'
      },
      {
        path: 'material-manage',
        // data: { name: '原料管理', url: 'recipes/material-manage' },
        // component: MaterialManageComponent,
        loadChildren: './material-manage/material-manage.module#MaterialManageModule'
      },
      {
        path: 'label-manage',
        // data: { name: '标签管理', url: 'recipes/label-manage' },
        // component: LabelManageComponent,
        loadChildren: './label-manage/label-manage.module#LabelManageModule'
      },
      {
        path: 'channel-manage',
        // data: { name: '渠道管理', url: 'recipes/channel-manage' },
        // component: ChannelManageComponent,
        loadChildren: './channel-manage/channel-manage.module#ChannelManageModule'
      }
    ]
  }
];


@NgModule({
  imports: [
    RouterModule.forChild(RecipesRoutes)
  ],
  exports: [
    RouterModule
  ]
})

export class RecipesRoutingModule { }
